package org.eclipselabs.egf.portfolio.task.scala.test.shortint

import org.eclipse.core.runtime.IProgressMonitor
import org.eclipse.egf.core.EGFCorePlugin
import org.eclipse.egf.core.producer.InvocationException
import org.eclipse.egf.ftask.producer.context.ITaskProductionContext
import org.eclipse.egf.ftask.producer.invocation.ITaskProduction
import java.lang.Short

class ShortEquals extends ITaskProduction{
	
	var a1 = new Short("-6996")
	var b1 = new Short("-53")
	var c1 = new Short("-2")
	var d1 = new Short("79")
	var e1 = new Short("132")
	var f1 = new Short("185")
	
	def preExecute(taskProductionContext:ITaskProductionContext , monitor:IProgressMonitor ) ={
	}
	
	def doExecute(taskProductionContext:ITaskProductionContext , monitor:IProgressMonitor )={
		var a = taskProductionContext.getInputValue("inA", classOf[Short])
		var b = taskProductionContext.getInputValue("inB", classOf[Short])
		var c = taskProductionContext.getInputValue("inC", classOf[Short])
		var d = taskProductionContext.getInputValue("inD", classOf[Short])
		var e = taskProductionContext.getInputValue("inE", classOf[Short])
		var f = taskProductionContext.getInputValue("inF", classOf[Short])
		if(a == a1 && b == b1 && c == c1 && d == d1 && e == e1 && f == f1)
			EGFCorePlugin.getDefault().logWarning("Test Passed")
		else
			EGFCorePlugin.getDefault().logError("Test Failed")
	}
	
	def postExecute(taskProductionContext:ITaskProductionContext , monitor:IProgressMonitor )={

	}
}